<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method='xml'
								indent="yes"
								omit-xml-declaration="yes"
								doctype-public = "-//W3C//DTD XHTML 1.0 Strict//EN"
								doctype-system = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
								/>

<!-- parameters -->
<xsl:param name="_prev"/>
<xsl:param name="_next"/>

<!-- image data -->
<xsl:param name="_id"/>
<xsl:param name="_title"/>
<xsl:param name="_date"/>

<xsl:template match="/">
<html>
<!-- html head -->
<head>
<title>Blog</title>

<link rel="stylesheet" type="text/css" href="template/style/blog.css"></link>
<link href="template/style/imageMenu.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="template/style/mootools-release-1.11.js"></script>
<script type="text/javascript" src="template/style/imageMenu.js"></script>

</head>

<body id="blog_body">
<!--
	<h3 class="menu">Menu</h3>
	<div id="blog_menu_div">
		<div id="imageMenu">
		<ul>
			<li class="landscapes"><a href="http://www.aaronbirchphotography.com">Landscapes</a></li>
			<li class="people"><a href="http://www.aaronbirchphotography.com">People</a></li>
			<li class="nature"><a href="http://www.aaronbirchphotography.com">Nature</a></li>
			<li class="urban"><a href="http://www.aaronbirchphotography.com">Urban</a></li>
			<li class="abstract"><a href="http://www.aaronbirchphotography.com">Abstract</a></li>
		</ul>
		</div>

	<script type="text/javascript">

		window.addEvent('domready', function(){
			var myMenu = new ImageMenu($$('#imageMenu a'),{openWidth:310, border:2, onOpen:function(e,i){alert(e);}});
		});
	</script>
	</div>
-->
	<div id="blog_header_div">
		<p id="blog_header_p">zobi's blog</p>
	</div>
	<!-- content -->
	<div id="blog_content_div">

		<div id="blog_img_title_div">
			<xsl:for-each select="/root/imageinfos/imageinfo">
			<xsl:value-of select="title"/>
			</xsl:for-each>
			<p/>
		</div>

		<!-- image -->
		<div id="blog_img_div">
			<img id="blog_img">
				<xsl:attribute name="src">index.php?op=display&amp;id=<xsl:value-of select="$_id"/></xsl:attribute>
			</img>
		</div>

		<div id="blog_img_description_div">
			<p/>
			<xsl:for-each select="/root/imageinfos/imageinfo">
			<xsl:value-of select="description"/> :: <xsl:value-of select="date"/>
			</xsl:for-each>
		</div>
		<!-- pagination -->
		<p id="blog_pagination_p">
		<xsl:if test="$_prev">
		<a>
			<xsl:attribute name="href">index.php?op=blog&amp;id=<xsl:value-of select="$_prev"/></xsl:attribute>
			&lt;Previous ::
		</a>
		</xsl:if>

		<xsl:if test="$_next">
		<a>
			<xsl:attribute name="href">index.php?op=blog&amp;id=<xsl:value-of select="$_next"/></xsl:attribute>
		 	:: Next&gt;
		</a>
		</xsl:if>
		</p>


		<div id="blog_add_comment_div">
			<br/>
			<a><xsl:attribute name="href">index.php?op=comment&amp;id=<xsl:value-of select="$_id"/></xsl:attribute>Add comment</a>
			<br/>
		</div>

		<!-- comments -->
		<div id="blog_comment_div">
			<h4>Comments</h4>
			<xsl:for-each select="/root/comments/comment">
			<hr/>
			<div>
				<xsl:value-of select="date"/>	:: <a><xsl:attribute name="href">index.php?op=listcomments&amp;name=<xsl:value-of select="name"/>&amp;id=<xsl:value-of select="$_id"/></xsl:attribute><xsl:value-of select="name"/></a> :: <xsl:value-of select="text"/>
			</div>
			<hr/>
			</xsl:for-each>
		</div>
	</div>
	<div id="blog_footer_div">
	</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
